#include <standard.hlsli>
//#include <WR2Parameters.hlsli>

//struct VS_INPUT
//{
//	float4 Position : POSITION;
//	float3 Normal : NORMAL0;
//	float4 kblend : COLOR1;
//};
//
//struct VertexToPixel
//{
//	float4 pos                : SV_POSITION;
//	float4 texCoord2          : TEXCOORD1;
//	float3 kBlend             : COLOR0;
//	float4 pos2               : TEXCOORD5;
//	float3 normal             : TEXCOORD6;
//};


struct VertexToPixel
{
    float4 pos : SV_POSITION;
    float4 texCoord1 : TEXCOORD0;
    float4 texCoord2 : TEXCOORD1;
    float4 texCoord3 : TEXCOORD2;
    float4 kBlend : COLOR0;
    float4 kColor : COLOR1;
    float4 pos2 : TEXCOORD5;
    float3 normal : TEXCOORD6;
    float foger : FOG;
};


struct PixelToFrame
{
	float4 Color;
};

PixelToFrame ps_main(VertexToPixel PSIn) : SV_TARGET
{
	PixelToFrame Output = (PixelToFrame)0;
	//float4 Lay1 = xColoredTexture1_Tex.Sample(Tex1, PSIn.texCoord2.xy);
	//	float4 TexColor = float4((Lay1.rgb * 0.05f + PSIn.kBlend.rgb * 0.25f + materialColor.rgb * 0.7f), 1.0f);
	//	Output.Color = TexColor;

    Output.Color = float4(materialColor.rgb, 1.0f);
	if (paintHighLines)
	{
		if (abs(PSIn.pos2.y) % 100.0f > 0.9f && abs(PSIn.pos2.y) % 100.0f  < 3.1f)
		{
			Output.Color.rgba = float4(1.0f, 0.0f, 0.0f, 0.5f);
		}
		else if (abs(PSIn.pos2.y) % 20.0f > 0.9f && abs(PSIn.pos2.y) % 20.0f < 3.1f)
		{
			Output.Color.rgba = float4(Output.Color.xyz * 1.5f, 0.50f);
		}
	}
	return  Output;
}